<!DOCTYPE html>
<html lang="ch">
<head>
    <meta charset="UTF-8">
    <title>#(title)</title>
    <base href="/">
    <link rel="stylesheet" href="/css/framework.css"/>
    <script src="/js/loader.js"></script>
    <script src="/system/config"></script>
</head>
<body>
<div id="app"></div>
<script>
    require.config({
        baseUrl: "/",
        paths: {
            compiler: '/compiler'
        }
    })
    let data = atob("#(data)")
    let l = data.length;
    let ia = new Uint8Array(l);
    for (let i = 0; i < l; i++) {
        ia[i] = data.charCodeAt(i);
    }
    let blob = new Blob([ia], {type: 'text/html;charset=utf-8'})
    let url = URL.createObjectURL(blob);
    require(['vue', 'compiler', 'vueRouter', "framework", 'HeyUI'], function (vue, c, vr, f, ui) {
        window.HeyUI = ui, window.F = f
        fetch(url).then(r => r.text()).then(r => {
            eval("define('current_page'," + c(r, '#(path)').substring(7))
            require(['current_page'], function (page) {
                let app = f.init(page)
                app.mount('#app')
                // vue.createApp(page).mount("#app")
            })
        })

    })
</script>
</body>
</html>
